import React from "react";
import lazyLoad from "../utils/lazyLoad";
import Layout from '../../components/Layout/Layout'
import Menu from '@mui/icons-material/Menu';

const nextTestRouter = [
  {
    element: <Layout />,
    children: [
      {
        path: '/next',
        element: lazyLoad(React.lazy(() => import("../../pages/NestPage"))),
        meta: {
          requiresAuth: true,
          key: "next",
          title: "测试二级路由嵌套",
          icon: Menu,
          titleI18n: 'oneLeveRouter',
          showNav: true
        },
        redirect: '/next/home',
        index: 3,
        children: [
          {
            path: '/next/home',
            element: lazyLoad(React.lazy(() => import("../../pages/NestPage/Home"))),
            meta: {
              requiresAuth: true,
              key: "nextHomeWork",
              title: "测试二级路由嵌套",
              titleI18n: 'twoLevelRouter',
              showNav: true
            },
            index: 31
          },
          {
            path: '/next/remoteCompTest',
            element: lazyLoad(React.lazy(() => import("../../pages/NestPage/RemoteCompTest"))),
            meta: {
              requiresAuth: true,
              key: "nextRemoteCompTest",
              title: "远程搜索组件测试",
              titleI18n: 'remoteCompTest',
              showNav: true
            },
            index: 32
          },
          {
            path: '/next/draw',
            element: lazyLoad(React.lazy(() => import("../../pages/Draw"))),
            meta: {
              requiresAuth: true,
              key: "mxgraph",
              title: "mxgraph",
              titleI18n: 'draw',
              showNav: true
            },
            index: 33
          },
          {
            path: '/next/konva',
            element: lazyLoad(React.lazy(() => import("../../pages/Konva"))),
            meta: {
              requiresAuth: true,
              key: "konva",
              title: "konva",
              titleI18n: 'konva',
              showNav: true
            },
            index: 34
          },
          {
            path: '/next/konvaFuncTest',
            element: lazyLoad(React.lazy(() => import("../../pages/KonvaFuncTest"))),
            meta: {
              requiresAuth: true,
              key: "konvaFuncTest",
              title: "konvaFuncTest",
              titleI18n: 'konvaFuncTest',
              showNav: true
            },
            index: 35
          }
        ]
      }
    ]
  },
]

export default nextTestRouter